package org.xjtu.weteam.web.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.xjtu.weteam.common.JsonResponse;
import org.xjtu.weteam.service.DictionaryService;

@RestController
@RequestMapping("/api/dictionary")
public class DictionaryController {
    private final Logger logger = LoggerFactory.getLogger(DictionaryController.class);

    @Autowired
    private DictionaryService dictionaryService;

    @GetMapping("/dictionaryValueSearchById")
    @ResponseBody
    public JsonResponse dictionaryValueSearchById(String dictionaryId) {
        return JsonResponse.success(dictionaryService.dictionaryValueSearchById(dictionaryId));
    }
}
